<center>
	<p>欢迎使用智能考试系统!</p>
<?php 
	if(!isset($_COOKIE["user"]) or $_COOKIE["user"]==""){
?>
	<p>您还没有登录</p>
	<p>
		<a href='login.php' style='padding-right:10px;>登录</a>
		<a href='reg.php'>注册</a>
	</p>
<?php  
	}else{
		echo "欢迎您:".$_COOKIE["user"];
		include "config.php";
		$sql = "select admin from $test_user where name='$_COOKIE[user]'";
		$result = $mysqli->query($sql);
		$admin=$result->fetch_array();
		if($admin[0]==0){
			echo "<p>您是普通用户,点击<a href='test.php'>这里</a>开始考试</p>";
			echo "<p>点击<a href='exam.php'>这里</a>查看历史测试成绩</p>";
		}else{
			echo "<p>您是管理员,点击<a href='admin.php'>这里</a>对题库管理</p>";
		}
 ?>
	<p>点击<a href="edit_pass.php">这里</a>修改密码</p>
	<p>点击<a href="exit.php">这里</a>退出登录</p>
<?php 
 }
 ?>	